﻿using CRM.Admin.Contracts.Dto.Customer;
using CRM.Admin.Contracts.Model.Customer;
using KingsSharp.Common.Data;
using KingsSharp.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CRM.Admin.Contracts.Contract.Customer
{
    /// <summary>
    /// 顾客性质基础设置业务契约
    /// </summary>
    public interface INatureService:IDependency
    {
        /// <summary>
        /// 顾客性质集合
        /// </summary>
        IQueryable<NatureCatalog> NatureCatalogs { get; }

        /// <summary>
        /// 顾客性质明细集合
        /// </summary>
        IQueryable<Nature> Natures { get; }

        /// <summary>
        /// 新增性质
        /// </summary>
        /// <param name="dtos">性质信息dto</param>
        /// <returns></returns>
        OperationResult Insert(params NatureCatalogDto[] dtos);

        /// <summary>
        /// 新增性质明细
        /// </summary>
        /// <param name="dtos">性质明细信息dto</param>
        /// <returns></returns>
        OperationResult Insert(params NatureDto[] dtos);

        /// <summary>
        /// 编辑顾客性质
        /// </summary>
        /// <param name="dtos">顾客性质信息dto</param>
        /// <returns></returns>
        OperationResult Update(params NatureCatalogDto[] dtos);

        /// <summary>
        /// 编辑顾客性质明细
        /// </summary>
        /// <param name="dtos">顾客性质明细信息dto</param>
        /// <returns></returns>
        OperationResult Update(params NatureDto[] dtos);

        /// <summary>
        /// 删除顾客性质
        /// </summary>
        /// <param name="isNature">是否为明细Natrue</param>
        /// <param name="ids">要删除的主键数组</param>
        /// <returns></returns>
        OperationResult Delete(bool isNature = false, params Guid[] ids);
    }
}
